package com.elong.qadev.dao;

import java.util.ArrayList;

import com.elong.qadev.entity.DBLink;
import com.elong.qadev.entity.DBSql;
import com.elong.qadev.entity.Entities;
import com.elong.qadev.entity.Header;
import com.elong.qadev.entity.HttpCase;
import com.elong.qadev.entity.NameValuePair;
import com.elong.qadev.entity.RunAfter;
import com.elong.qadev.entity.RunBefore;
import com.elong.qadev.entity.UrlParam;
/**
 * 
* @ClassName: HttpCaseDaoI
* @Description: TODO(HTTP用例相关业务操作DAO)
* @author kangchen
* @date 2015年10月2日
*
 */
public interface HttpCaseDaoI {
	public ArrayList<Header> getHeaders(int caseId);
	public Entities getEntities(int caseId);
	public ArrayList<NameValuePair> getNameValuePairs(int caseId);
	public ArrayList<UrlParam> getUrlParams(int caseId);
	public HttpCase getHttpCase(int caseId);
	public ArrayList<RunBefore> getRunBefores(int caseId);
	public ArrayList<RunAfter> getRunAfters(int caseId);
	
	public boolean deleteHeaders(int caseId);
	public boolean deleteEntities(int caseId);
	public boolean deleteNameValuePairs(int caseId);
	public boolean deleteUrlParams(int caseId);
	public boolean deleteHttpCase(int caseId);
	public boolean deleteRunBefores(int caseId);
	public boolean deleteRunAfters(int caseId);
	
	public boolean saveHeaders(ArrayList<Header> ah);
	public boolean saveEntities(Entities e);
	public boolean saveNameValuePairs(ArrayList<NameValuePair> an);
	public boolean saveUrlParams(ArrayList<UrlParam> au);
	public boolean saveHttpCase(HttpCase hc);
	public boolean saveRunBefores(ArrayList<RunBefore> lb);
	public boolean saveRunAfters(ArrayList<RunAfter> lr);
	public boolean saveResponseAndResult(int caseId, boolean isExpected,
			String response);
	public DBLink getDBLinkById(int sqlId);
	public ArrayList<DBLink> getDBLinks();
	public boolean saveDBLink(DBLink dbLink);
	public boolean deleteDBLink(int id);
	public DBSql getDBSqlById(int sqlId);
	public ArrayList<DBSql> getDBSqls();
	public boolean saveDBSql(DBSql dbSql);
	public boolean deleteDBSql(int id);
	
	
}
